#include <stdio.h>

void printDNA(int curr) {
    switch (curr % 3) {
    case 0:
        printf("   AT   \n");
        printf("  T--A  \n");
        printf(" A----T \n");
        printf("T------A\n");
        printf("T------A\n");
        printf(" G----C \n");
        printf("  T--A  \n");
        printf("   GC   \n");
        break;
    case 1:
        printf("   CG   \n");
        printf("  C--G  \n");
        printf(" A----T \n");
        printf("A------T\n");
        printf("T------A\n");
        printf(" A----T \n");
        printf("  A--T  \n");
        printf("   GC   \n");
        break;
    case 2:
        printf("   AT   \n");
        printf("  C--G  \n");
        printf(" T----A \n");
        printf("C------G\n");
        printf("C------G\n");
        printf(" T----A \n");
        printf("  G--C  \n");
        printf("   AT   \n");
        break;
    default:
        break;
    }
}

int main() {
    int times; scanf("%d", &times);
    for (int i = 0; (i + 1) * 2 <= times; i++) {
        printDNA(i);
    }
    return 0;
}